package com.mate.cloud.auth.service;

import com.mate.cloud.auth.domain.UmsAdmin;
import com.mate.cloud.auth.domain.UmsResource;
import com.mate.cloud.auth.dto.UpdateAdminPasswordParam;
import com.mate.cloud.mybatis.bases.IBasesService;
import org.springframework.security.core.userdetails.UserDetailsService;

import java.util.List;

/**
 * 后台用于管理Service
 * @author:         MI
 * @email:          448341911@qq.com
 * @createTime:     2024/6/14 21:29
 * @updateUser:     MI
 * @updateTime:     2024/6/14 21:29
 * @updateRemark:   修改内容
 * @version:        v1.0
 */
public interface UmsAdminService extends UserDetailsService, IBasesService<UmsAdmin> {
    /**
     * 根据用户名获取用户信息
     */
    UmsAdmin getAdminByUsername(String username);

    /**
     * 用户名密码登录
     */
    String login(String username, String password);

    /**
     * 获取指定用户的可访问资源
     */
    List<UmsResource> getResourceList(Integer adminId);

    String refreshToken(String token);


    /**
     * 修改密码
     */
    int updatePassword(UpdateAdminPasswordParam updatePasswordParam);
}
